import React from 'react';
import { NavBar, Icon } from 'antd-mobile'
import { withRouter } from 'react-router-dom'
import './nav.css'

const Nav = (props) => {
    return (
        <div>
            <NavBar
                icon={<Icon type="left" />}
                onLeftClick={() => props.history.goBack()}
                style={{ background: '#062f45', position: 'sticky', top: '0', left: '0', width: '100%' }}
            >{props.title}</NavBar>
        </div>
    );
}

export default withRouter(Nav);